
/**
 * This is a generated class and is not intended for modification.  
 */
package valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _GetPublicObservationsResponseList_typeEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("record_id", "station_id", "observation_date", "individual_id", "scientific_name", "common_name", "kingdom", "category", "phenophase_name", "definition", "additional_definition", "search_method", "duration", "duration_units", "extent", "latitude", "longitude", "elevation", "network_name");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("record_id", "station_id", "observation_date", "individual_id", "scientific_name", "common_name", "kingdom", "category", "phenophase_name", "definition", "additional_definition", "search_method", "duration", "duration_units", "extent", "latitude", "longitude", "elevation", "network_name");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("record_id", "station_id", "observation_date", "individual_id", "scientific_name", "common_name", "kingdom", "category", "phenophase_name", "definition", "additional_definition", "search_method", "duration", "duration_units", "extent", "latitude", "longitude", "elevation", "network_name");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("record_id", "station_id", "observation_date", "individual_id", "scientific_name", "common_name", "kingdom", "category", "phenophase_name", "definition", "additional_definition", "search_method", "duration", "duration_units", "extent", "latitude", "longitude", "elevation", "network_name");
    model_internal static var sourceProperties:Array = emptyArray
    model_internal static var nonDerivedProperties:Array = new Array("record_id", "station_id", "observation_date", "individual_id", "scientific_name", "common_name", "kingdom", "category", "phenophase_name", "definition", "additional_definition", "search_method", "duration", "duration_units", "extent", "latitude", "longitude", "elevation", "network_name");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "GetPublicObservationsResponseList_type";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();
    model_internal static var propertyTypeMap:Object;

    
    model_internal var _observation_dateIsValid:Boolean;
    model_internal var _observation_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _observation_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _observation_dateValidationFailureMessages:Array;
    
    model_internal var _scientific_nameIsValid:Boolean;
    model_internal var _scientific_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _scientific_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _scientific_nameValidationFailureMessages:Array;
    
    model_internal var _common_nameIsValid:Boolean;
    model_internal var _common_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _common_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _common_nameValidationFailureMessages:Array;
    
    model_internal var _kingdomIsValid:Boolean;
    model_internal var _kingdomValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _kingdomIsValidCacheInitialized:Boolean = false;
    model_internal var _kingdomValidationFailureMessages:Array;
    
    model_internal var _categoryIsValid:Boolean;
    model_internal var _categoryValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _categoryIsValidCacheInitialized:Boolean = false;
    model_internal var _categoryValidationFailureMessages:Array;
    
    model_internal var _phenophase_nameIsValid:Boolean;
    model_internal var _phenophase_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _phenophase_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _phenophase_nameValidationFailureMessages:Array;
    
    model_internal var _definitionIsValid:Boolean;
    model_internal var _definitionValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _definitionIsValidCacheInitialized:Boolean = false;
    model_internal var _definitionValidationFailureMessages:Array;
    
    model_internal var _additional_definitionIsValid:Boolean;
    model_internal var _additional_definitionValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _additional_definitionIsValidCacheInitialized:Boolean = false;
    model_internal var _additional_definitionValidationFailureMessages:Array;
    
    model_internal var _search_methodIsValid:Boolean;
    model_internal var _search_methodValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _search_methodIsValidCacheInitialized:Boolean = false;
    model_internal var _search_methodValidationFailureMessages:Array;
    
    model_internal var _duration_unitsIsValid:Boolean;
    model_internal var _duration_unitsValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _duration_unitsIsValidCacheInitialized:Boolean = false;
    model_internal var _duration_unitsValidationFailureMessages:Array;
    
    model_internal var _extentIsValid:Boolean;
    model_internal var _extentValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _extentIsValidCacheInitialized:Boolean = false;
    model_internal var _extentValidationFailureMessages:Array;
    
    model_internal var _network_nameIsValid:Boolean;
    model_internal var _network_nameValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _network_nameIsValidCacheInitialized:Boolean = false;
    model_internal var _network_nameValidationFailureMessages:Array;

    model_internal var _instance:_Super_GetPublicObservationsResponseList_type;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _GetPublicObservationsResponseList_typeEntityMetadata(value : _Super_GetPublicObservationsResponseList_type)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // dependents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["record_id"] = new Array();
            model_internal::dependentsOnMap["station_id"] = new Array();
            model_internal::dependentsOnMap["observation_date"] = new Array();
            model_internal::dependentsOnMap["individual_id"] = new Array();
            model_internal::dependentsOnMap["scientific_name"] = new Array();
            model_internal::dependentsOnMap["common_name"] = new Array();
            model_internal::dependentsOnMap["kingdom"] = new Array();
            model_internal::dependentsOnMap["category"] = new Array();
            model_internal::dependentsOnMap["phenophase_name"] = new Array();
            model_internal::dependentsOnMap["definition"] = new Array();
            model_internal::dependentsOnMap["additional_definition"] = new Array();
            model_internal::dependentsOnMap["search_method"] = new Array();
            model_internal::dependentsOnMap["duration"] = new Array();
            model_internal::dependentsOnMap["duration_units"] = new Array();
            model_internal::dependentsOnMap["extent"] = new Array();
            model_internal::dependentsOnMap["latitude"] = new Array();
            model_internal::dependentsOnMap["longitude"] = new Array();
            model_internal::dependentsOnMap["elevation"] = new Array();
            model_internal::dependentsOnMap["network_name"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object();
        }

        // Property type Map
        model_internal::propertyTypeMap = new Object();
        model_internal::propertyTypeMap["record_id"] = "int";
        model_internal::propertyTypeMap["station_id"] = "int";
        model_internal::propertyTypeMap["observation_date"] = "String";
        model_internal::propertyTypeMap["individual_id"] = "int";
        model_internal::propertyTypeMap["scientific_name"] = "String";
        model_internal::propertyTypeMap["common_name"] = "String";
        model_internal::propertyTypeMap["kingdom"] = "String";
        model_internal::propertyTypeMap["category"] = "String";
        model_internal::propertyTypeMap["phenophase_name"] = "String";
        model_internal::propertyTypeMap["definition"] = "String";
        model_internal::propertyTypeMap["additional_definition"] = "String";
        model_internal::propertyTypeMap["search_method"] = "String";
        model_internal::propertyTypeMap["duration"] = "int";
        model_internal::propertyTypeMap["duration_units"] = "String";
        model_internal::propertyTypeMap["extent"] = "String";
        model_internal::propertyTypeMap["latitude"] = "Number";
        model_internal::propertyTypeMap["longitude"] = "Number";
        model_internal::propertyTypeMap["elevation"] = "int";
        model_internal::propertyTypeMap["network_name"] = "String";

        model_internal::_instance = value;
        model_internal::_observation_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForObservation_date);
        model_internal::_observation_dateValidator.required = true;
        model_internal::_observation_dateValidator.requiredFieldError = "observation_date is required";
        //model_internal::_observation_dateValidator.source = model_internal::_instance;
        //model_internal::_observation_dateValidator.property = "observation_date";
        model_internal::_scientific_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForScientific_name);
        model_internal::_scientific_nameValidator.required = true;
        model_internal::_scientific_nameValidator.requiredFieldError = "scientific_name is required";
        //model_internal::_scientific_nameValidator.source = model_internal::_instance;
        //model_internal::_scientific_nameValidator.property = "scientific_name";
        model_internal::_common_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCommon_name);
        model_internal::_common_nameValidator.required = true;
        model_internal::_common_nameValidator.requiredFieldError = "common_name is required";
        //model_internal::_common_nameValidator.source = model_internal::_instance;
        //model_internal::_common_nameValidator.property = "common_name";
        model_internal::_kingdomValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForKingdom);
        model_internal::_kingdomValidator.required = true;
        model_internal::_kingdomValidator.requiredFieldError = "kingdom is required";
        //model_internal::_kingdomValidator.source = model_internal::_instance;
        //model_internal::_kingdomValidator.property = "kingdom";
        model_internal::_categoryValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCategory);
        model_internal::_categoryValidator.required = true;
        model_internal::_categoryValidator.requiredFieldError = "category is required";
        //model_internal::_categoryValidator.source = model_internal::_instance;
        //model_internal::_categoryValidator.property = "category";
        model_internal::_phenophase_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPhenophase_name);
        model_internal::_phenophase_nameValidator.required = true;
        model_internal::_phenophase_nameValidator.requiredFieldError = "phenophase_name is required";
        //model_internal::_phenophase_nameValidator.source = model_internal::_instance;
        //model_internal::_phenophase_nameValidator.property = "phenophase_name";
        model_internal::_definitionValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDefinition);
        model_internal::_definitionValidator.required = true;
        model_internal::_definitionValidator.requiredFieldError = "definition is required";
        //model_internal::_definitionValidator.source = model_internal::_instance;
        //model_internal::_definitionValidator.property = "definition";
        model_internal::_additional_definitionValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForAdditional_definition);
        model_internal::_additional_definitionValidator.required = true;
        model_internal::_additional_definitionValidator.requiredFieldError = "additional_definition is required";
        //model_internal::_additional_definitionValidator.source = model_internal::_instance;
        //model_internal::_additional_definitionValidator.property = "additional_definition";
        model_internal::_search_methodValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSearch_method);
        model_internal::_search_methodValidator.required = true;
        model_internal::_search_methodValidator.requiredFieldError = "search_method is required";
        //model_internal::_search_methodValidator.source = model_internal::_instance;
        //model_internal::_search_methodValidator.property = "search_method";
        model_internal::_duration_unitsValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForDuration_units);
        model_internal::_duration_unitsValidator.required = true;
        model_internal::_duration_unitsValidator.requiredFieldError = "duration_units is required";
        //model_internal::_duration_unitsValidator.source = model_internal::_instance;
        //model_internal::_duration_unitsValidator.property = "duration_units";
        model_internal::_extentValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForExtent);
        model_internal::_extentValidator.required = true;
        model_internal::_extentValidator.requiredFieldError = "extent is required";
        //model_internal::_extentValidator.source = model_internal::_instance;
        //model_internal::_extentValidator.property = "extent";
        model_internal::_network_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForNetwork_name);
        model_internal::_network_nameValidator.required = true;
        model_internal::_network_nameValidator.requiredFieldError = "network_name is required";
        //model_internal::_network_nameValidator.source = model_internal::_instance;
        //model_internal::_network_nameValidator.property = "network_name";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    public function getSourceProperties():Array
    {
        return model_internal::sourceProperties;
    }

    public function getNonDerivedProperties():Array
    {
        return model_internal::nonDerivedProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity GetPublicObservationsResponseList_type");
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity GetPublicObservationsResponseList_type");

        return model_internal::collectionBaseMap[propertyName];
    }
    
    override public function getPropertyType(propertyName:String):String
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a property of GetPublicObservationsResponseList_type");

        return model_internal::propertyTypeMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GetPublicObservationsResponseList_type");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a modifiable property of entity GetPublicObservationsResponseList_type");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GetPublicObservationsResponseList_type");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isRecord_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isStation_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isObservation_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIndividual_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isScientific_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCommon_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isKingdomAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCategoryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPhenophase_nameAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDefinitionAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAdditional_definitionAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSearch_methodAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDurationAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDuration_unitsAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isExtentAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLatitudeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLongitudeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isElevationAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isNetwork_nameAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnObservation_date():void
    {
        if (model_internal::_observation_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfObservation_date = null;
            model_internal::calculateObservation_dateIsValid();
        }
    }
    public function invalidateDependentOnScientific_name():void
    {
        if (model_internal::_scientific_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfScientific_name = null;
            model_internal::calculateScientific_nameIsValid();
        }
    }
    public function invalidateDependentOnCommon_name():void
    {
        if (model_internal::_common_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCommon_name = null;
            model_internal::calculateCommon_nameIsValid();
        }
    }
    public function invalidateDependentOnKingdom():void
    {
        if (model_internal::_kingdomIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfKingdom = null;
            model_internal::calculateKingdomIsValid();
        }
    }
    public function invalidateDependentOnCategory():void
    {
        if (model_internal::_categoryIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCategory = null;
            model_internal::calculateCategoryIsValid();
        }
    }
    public function invalidateDependentOnPhenophase_name():void
    {
        if (model_internal::_phenophase_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPhenophase_name = null;
            model_internal::calculatePhenophase_nameIsValid();
        }
    }
    public function invalidateDependentOnDefinition():void
    {
        if (model_internal::_definitionIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDefinition = null;
            model_internal::calculateDefinitionIsValid();
        }
    }
    public function invalidateDependentOnAdditional_definition():void
    {
        if (model_internal::_additional_definitionIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfAdditional_definition = null;
            model_internal::calculateAdditional_definitionIsValid();
        }
    }
    public function invalidateDependentOnSearch_method():void
    {
        if (model_internal::_search_methodIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSearch_method = null;
            model_internal::calculateSearch_methodIsValid();
        }
    }
    public function invalidateDependentOnDuration_units():void
    {
        if (model_internal::_duration_unitsIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfDuration_units = null;
            model_internal::calculateDuration_unitsIsValid();
        }
    }
    public function invalidateDependentOnExtent():void
    {
        if (model_internal::_extentIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfExtent = null;
            model_internal::calculateExtentIsValid();
        }
    }
    public function invalidateDependentOnNetwork_name():void
    {
        if (model_internal::_network_nameIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfNetwork_name = null;
            model_internal::calculateNetwork_nameIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get record_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get station_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get observation_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get observation_dateValidator() : StyleValidator
    {
        return model_internal::_observation_dateValidator;
    }

    model_internal function set _observation_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_observation_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_observation_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "observation_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get observation_dateIsValid():Boolean
    {
        if (!model_internal::_observation_dateIsValidCacheInitialized)
        {
            model_internal::calculateObservation_dateIsValid();
        }

        return model_internal::_observation_dateIsValid;
    }

    model_internal function calculateObservation_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_observation_dateValidator.validate(model_internal::_instance.observation_date)
        model_internal::_observation_dateIsValid_der = (valRes.results == null);
        model_internal::_observation_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::observation_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::observation_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get observation_dateValidationFailureMessages():Array
    {
        if (model_internal::_observation_dateValidationFailureMessages == null)
            model_internal::calculateObservation_dateIsValid();

        return _observation_dateValidationFailureMessages;
    }

    model_internal function set observation_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_observation_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_observation_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "observation_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get individual_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get scientific_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get scientific_nameValidator() : StyleValidator
    {
        return model_internal::_scientific_nameValidator;
    }

    model_internal function set _scientific_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_scientific_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_scientific_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "scientific_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get scientific_nameIsValid():Boolean
    {
        if (!model_internal::_scientific_nameIsValidCacheInitialized)
        {
            model_internal::calculateScientific_nameIsValid();
        }

        return model_internal::_scientific_nameIsValid;
    }

    model_internal function calculateScientific_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_scientific_nameValidator.validate(model_internal::_instance.scientific_name)
        model_internal::_scientific_nameIsValid_der = (valRes.results == null);
        model_internal::_scientific_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::scientific_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::scientific_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get scientific_nameValidationFailureMessages():Array
    {
        if (model_internal::_scientific_nameValidationFailureMessages == null)
            model_internal::calculateScientific_nameIsValid();

        return _scientific_nameValidationFailureMessages;
    }

    model_internal function set scientific_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_scientific_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_scientific_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "scientific_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get common_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get common_nameValidator() : StyleValidator
    {
        return model_internal::_common_nameValidator;
    }

    model_internal function set _common_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_common_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_common_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "common_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get common_nameIsValid():Boolean
    {
        if (!model_internal::_common_nameIsValidCacheInitialized)
        {
            model_internal::calculateCommon_nameIsValid();
        }

        return model_internal::_common_nameIsValid;
    }

    model_internal function calculateCommon_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_common_nameValidator.validate(model_internal::_instance.common_name)
        model_internal::_common_nameIsValid_der = (valRes.results == null);
        model_internal::_common_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::common_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::common_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get common_nameValidationFailureMessages():Array
    {
        if (model_internal::_common_nameValidationFailureMessages == null)
            model_internal::calculateCommon_nameIsValid();

        return _common_nameValidationFailureMessages;
    }

    model_internal function set common_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_common_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_common_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "common_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get kingdomStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get kingdomValidator() : StyleValidator
    {
        return model_internal::_kingdomValidator;
    }

    model_internal function set _kingdomIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_kingdomIsValid;         
        if (oldValue !== value)
        {
            model_internal::_kingdomIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "kingdomIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get kingdomIsValid():Boolean
    {
        if (!model_internal::_kingdomIsValidCacheInitialized)
        {
            model_internal::calculateKingdomIsValid();
        }

        return model_internal::_kingdomIsValid;
    }

    model_internal function calculateKingdomIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_kingdomValidator.validate(model_internal::_instance.kingdom)
        model_internal::_kingdomIsValid_der = (valRes.results == null);
        model_internal::_kingdomIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::kingdomValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::kingdomValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get kingdomValidationFailureMessages():Array
    {
        if (model_internal::_kingdomValidationFailureMessages == null)
            model_internal::calculateKingdomIsValid();

        return _kingdomValidationFailureMessages;
    }

    model_internal function set kingdomValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_kingdomValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_kingdomValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "kingdomValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get categoryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get categoryValidator() : StyleValidator
    {
        return model_internal::_categoryValidator;
    }

    model_internal function set _categoryIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_categoryIsValid;         
        if (oldValue !== value)
        {
            model_internal::_categoryIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "categoryIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get categoryIsValid():Boolean
    {
        if (!model_internal::_categoryIsValidCacheInitialized)
        {
            model_internal::calculateCategoryIsValid();
        }

        return model_internal::_categoryIsValid;
    }

    model_internal function calculateCategoryIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_categoryValidator.validate(model_internal::_instance.category)
        model_internal::_categoryIsValid_der = (valRes.results == null);
        model_internal::_categoryIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::categoryValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::categoryValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get categoryValidationFailureMessages():Array
    {
        if (model_internal::_categoryValidationFailureMessages == null)
            model_internal::calculateCategoryIsValid();

        return _categoryValidationFailureMessages;
    }

    model_internal function set categoryValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_categoryValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_categoryValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "categoryValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get phenophase_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get phenophase_nameValidator() : StyleValidator
    {
        return model_internal::_phenophase_nameValidator;
    }

    model_internal function set _phenophase_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_phenophase_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_phenophase_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "phenophase_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get phenophase_nameIsValid():Boolean
    {
        if (!model_internal::_phenophase_nameIsValidCacheInitialized)
        {
            model_internal::calculatePhenophase_nameIsValid();
        }

        return model_internal::_phenophase_nameIsValid;
    }

    model_internal function calculatePhenophase_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_phenophase_nameValidator.validate(model_internal::_instance.phenophase_name)
        model_internal::_phenophase_nameIsValid_der = (valRes.results == null);
        model_internal::_phenophase_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::phenophase_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::phenophase_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get phenophase_nameValidationFailureMessages():Array
    {
        if (model_internal::_phenophase_nameValidationFailureMessages == null)
            model_internal::calculatePhenophase_nameIsValid();

        return _phenophase_nameValidationFailureMessages;
    }

    model_internal function set phenophase_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_phenophase_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_phenophase_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "phenophase_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get definitionStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get definitionValidator() : StyleValidator
    {
        return model_internal::_definitionValidator;
    }

    model_internal function set _definitionIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_definitionIsValid;         
        if (oldValue !== value)
        {
            model_internal::_definitionIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "definitionIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get definitionIsValid():Boolean
    {
        if (!model_internal::_definitionIsValidCacheInitialized)
        {
            model_internal::calculateDefinitionIsValid();
        }

        return model_internal::_definitionIsValid;
    }

    model_internal function calculateDefinitionIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_definitionValidator.validate(model_internal::_instance.definition)
        model_internal::_definitionIsValid_der = (valRes.results == null);
        model_internal::_definitionIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::definitionValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::definitionValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get definitionValidationFailureMessages():Array
    {
        if (model_internal::_definitionValidationFailureMessages == null)
            model_internal::calculateDefinitionIsValid();

        return _definitionValidationFailureMessages;
    }

    model_internal function set definitionValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_definitionValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_definitionValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "definitionValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get additional_definitionStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get additional_definitionValidator() : StyleValidator
    {
        return model_internal::_additional_definitionValidator;
    }

    model_internal function set _additional_definitionIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_additional_definitionIsValid;         
        if (oldValue !== value)
        {
            model_internal::_additional_definitionIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "additional_definitionIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get additional_definitionIsValid():Boolean
    {
        if (!model_internal::_additional_definitionIsValidCacheInitialized)
        {
            model_internal::calculateAdditional_definitionIsValid();
        }

        return model_internal::_additional_definitionIsValid;
    }

    model_internal function calculateAdditional_definitionIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_additional_definitionValidator.validate(model_internal::_instance.additional_definition)
        model_internal::_additional_definitionIsValid_der = (valRes.results == null);
        model_internal::_additional_definitionIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::additional_definitionValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::additional_definitionValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get additional_definitionValidationFailureMessages():Array
    {
        if (model_internal::_additional_definitionValidationFailureMessages == null)
            model_internal::calculateAdditional_definitionIsValid();

        return _additional_definitionValidationFailureMessages;
    }

    model_internal function set additional_definitionValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_additional_definitionValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_additional_definitionValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "additional_definitionValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get search_methodStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get search_methodValidator() : StyleValidator
    {
        return model_internal::_search_methodValidator;
    }

    model_internal function set _search_methodIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_search_methodIsValid;         
        if (oldValue !== value)
        {
            model_internal::_search_methodIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "search_methodIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get search_methodIsValid():Boolean
    {
        if (!model_internal::_search_methodIsValidCacheInitialized)
        {
            model_internal::calculateSearch_methodIsValid();
        }

        return model_internal::_search_methodIsValid;
    }

    model_internal function calculateSearch_methodIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_search_methodValidator.validate(model_internal::_instance.search_method)
        model_internal::_search_methodIsValid_der = (valRes.results == null);
        model_internal::_search_methodIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::search_methodValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::search_methodValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get search_methodValidationFailureMessages():Array
    {
        if (model_internal::_search_methodValidationFailureMessages == null)
            model_internal::calculateSearch_methodIsValid();

        return _search_methodValidationFailureMessages;
    }

    model_internal function set search_methodValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_search_methodValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_search_methodValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "search_methodValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get durationStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get duration_unitsStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get duration_unitsValidator() : StyleValidator
    {
        return model_internal::_duration_unitsValidator;
    }

    model_internal function set _duration_unitsIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_duration_unitsIsValid;         
        if (oldValue !== value)
        {
            model_internal::_duration_unitsIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "duration_unitsIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get duration_unitsIsValid():Boolean
    {
        if (!model_internal::_duration_unitsIsValidCacheInitialized)
        {
            model_internal::calculateDuration_unitsIsValid();
        }

        return model_internal::_duration_unitsIsValid;
    }

    model_internal function calculateDuration_unitsIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_duration_unitsValidator.validate(model_internal::_instance.duration_units)
        model_internal::_duration_unitsIsValid_der = (valRes.results == null);
        model_internal::_duration_unitsIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::duration_unitsValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::duration_unitsValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get duration_unitsValidationFailureMessages():Array
    {
        if (model_internal::_duration_unitsValidationFailureMessages == null)
            model_internal::calculateDuration_unitsIsValid();

        return _duration_unitsValidationFailureMessages;
    }

    model_internal function set duration_unitsValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_duration_unitsValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_duration_unitsValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "duration_unitsValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get extentStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get extentValidator() : StyleValidator
    {
        return model_internal::_extentValidator;
    }

    model_internal function set _extentIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_extentIsValid;         
        if (oldValue !== value)
        {
            model_internal::_extentIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "extentIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get extentIsValid():Boolean
    {
        if (!model_internal::_extentIsValidCacheInitialized)
        {
            model_internal::calculateExtentIsValid();
        }

        return model_internal::_extentIsValid;
    }

    model_internal function calculateExtentIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_extentValidator.validate(model_internal::_instance.extent)
        model_internal::_extentIsValid_der = (valRes.results == null);
        model_internal::_extentIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::extentValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::extentValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get extentValidationFailureMessages():Array
    {
        if (model_internal::_extentValidationFailureMessages == null)
            model_internal::calculateExtentIsValid();

        return _extentValidationFailureMessages;
    }

    model_internal function set extentValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_extentValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_extentValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "extentValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get latitudeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get longitudeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get elevationStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get network_nameStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get network_nameValidator() : StyleValidator
    {
        return model_internal::_network_nameValidator;
    }

    model_internal function set _network_nameIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_network_nameIsValid;         
        if (oldValue !== value)
        {
            model_internal::_network_nameIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "network_nameIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get network_nameIsValid():Boolean
    {
        if (!model_internal::_network_nameIsValidCacheInitialized)
        {
            model_internal::calculateNetwork_nameIsValid();
        }

        return model_internal::_network_nameIsValid;
    }

    model_internal function calculateNetwork_nameIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_network_nameValidator.validate(model_internal::_instance.network_name)
        model_internal::_network_nameIsValid_der = (valRes.results == null);
        model_internal::_network_nameIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::network_nameValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::network_nameValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get network_nameValidationFailureMessages():Array
    {
        if (model_internal::_network_nameValidationFailureMessages == null)
            model_internal::calculateNetwork_nameIsValid();

        return _network_nameValidationFailureMessages;
    }

    model_internal function set network_nameValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_network_nameValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_network_nameValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "network_nameValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("observation_date"):
            {
                return observation_dateValidationFailureMessages;
            }
            case("scientific_name"):
            {
                return scientific_nameValidationFailureMessages;
            }
            case("common_name"):
            {
                return common_nameValidationFailureMessages;
            }
            case("kingdom"):
            {
                return kingdomValidationFailureMessages;
            }
            case("category"):
            {
                return categoryValidationFailureMessages;
            }
            case("phenophase_name"):
            {
                return phenophase_nameValidationFailureMessages;
            }
            case("definition"):
            {
                return definitionValidationFailureMessages;
            }
            case("additional_definition"):
            {
                return additional_definitionValidationFailureMessages;
            }
            case("search_method"):
            {
                return search_methodValidationFailureMessages;
            }
            case("duration_units"):
            {
                return duration_unitsValidationFailureMessages;
            }
            case("extent"):
            {
                return extentValidationFailureMessages;
            }
            case("network_name"):
            {
                return network_nameValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
